//
//  HGTableViewCell.m
//  个人项目(豆瓣元旦作业)
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 guoguo. All rights reserved.
//

#import "HGTableViewCell.h"

@implementation HGTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell{
    
    self.imageBack1 = [[UIImageView alloc] init];
    [self.contentView addSubview: _imageBack1];
    
    
    self.imageBack2 = [[UIImageView alloc] init];
    [self.contentView addSubview:_imageBack2];
    
    self.image1 = [[UIImageView alloc] init];
    [self.contentView addSubview:_image1];
    
    self.image2 = [[UIImageView alloc] init];
    [self.contentView addSubview:_image2];
    
    self.image3 = [[UIImageView alloc] init];
    [self.contentView addSubview:_image3];
    
    self.imagePicture = [[UIImageView alloc] init];
    [self.contentView addSubview:_imagePicture];
    
    
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_titleLabel];
    
    self.timeLabel = [[UILabel alloc] init] ;
    [self.contentView addSubview:_timeLabel];
    
    self.addressLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_addressLabel];
    
    
    self.typeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_typeLabel];
    
    self.washLable = [[UILabel alloc] init];
    [self.contentView addSubview:_washLable];
    
    
    self.joinLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_joinLabel];
    
    
    self.label1 = [[UILabel alloc] init];
    [self.contentView addSubview:_label1];
    
    self.label2 = [[UILabel alloc] init];
    [self.contentView addSubview:_label2];
    
    
    
    
}

- (void)layoutSubviews{
    
    _imageBack1.frame = CGRectMake(15, 15, 348, 185);
    
    
    _imageBack2.frame = CGRectMake(18, 50, 342, 140);
    
    
    
    _titleLabel.frame = CGRectMake(20, 10, 340, 50);
    _titleLabel.font = [UIFont systemFontOfSize:20];
    
    _image1.frame = CGRectMake(25, 55, 20, 20);
    
    
    _timeLabel.frame = CGRectMake(51, 53, 220, 25);
    _timeLabel.font = [UIFont systemFontOfSize:16];
    
    _image2.frame = CGRectMake(25, 76, 20, 20);
    
    
    
    _addressLabel.frame = CGRectMake(51, 74, 210, 25);
    _addressLabel.font = [UIFont systemFontOfSize:16];
    
    _image3.frame = CGRectMake(25, 99, 20, 20);
    
    
    _typeLabel.frame = CGRectMake(51, 97, 200, 25);
    _typeLabel.font = [UIFont systemFontOfSize:16];
    
    _label1.frame = CGRectMake(40, 140, 100, 20);
    
    _washLable.frame = CGRectMake(100, 140, 100, 20);
    
    _washLable.font = [UIFont systemFontOfSize:16];
    _washLable.textColor = [UIColor redColor];
    
    _label2.frame = CGRectMake(150, 140, 50, 20);
    
    
    _joinLabel.frame = CGRectMake(190, 140, 50, 20);
    _joinLabel.font = [UIFont systemFontOfSize:16];
    _joinLabel.textColor = [UIColor redColor];
    
    _imagePicture.frame = CGRectMake(265, 53, 90, 130);
    
    
    
    
    
    
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
